package cn.iocoder.yudao.module.dr.controller.admin.collectionattachment.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 藏品附件 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CollectionAttachmentRespVO {

    @Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7530")
    @ExcelProperty("自增主键")
    private Long id;

    @Schema(description = "附件主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24372")
    @ExcelProperty("附件主键")
    private String attachmentId;

    @Schema(description = "关联藏品主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19740")
    @ExcelProperty("关联藏品主键")
    private Long collectionId;

    @Schema(description = "藏品总登记号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19740")
    @ExcelProperty("藏品总登记号")
    private String generalAccessionNumber;

    @Schema(description = "附件类型 1 图片 2 音频 3 视频 4 模型", example = "2")
    @ExcelProperty(value = "附件类型 1 图片 2 音频 3 视频 4 模型", converter = DictConvert.class)
    @DictFormat("attach_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String attachType;

    /**
     *  附件信息
     */

    @Schema(description = "配置编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
    private Long configId;

    @Schema(description = "文件路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao.jpg")
    private String path;

    @Schema(description = "原文件名", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao.jpg")
    private String name;

    @Schema(description = "文件 URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/yudao.jpg")
    private String url;

    @Schema(description = "文件MIME类型", example = "application/octet-stream")
    private String type;

    @Schema(description = "文件大小", example = "2048", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer size;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}